package GJAM.SAMPLE.Calculator;

import GJAM.MVC.*;

public class CalculatorModel extends Model {

    private int result;

    public void Calculate(int op1, String operator, int op2) {
        if (operator.equals("*")) {
            result = (op1 * op2);
        }

        if (operator.equals("/")) {
            result = (op1 / op2);
        }

        if (operator.equals("+")) {
            result = (op1 + op2);
        }

        if (operator.equals("-")) {
            result = (op1 - op2);
        }
    }

    public int getResult() {
        return result;
    }
}
